﻿// We are given a matrix of strings of size N x M. 
// Sequences in the matrix we define as sets of several neighbor elements located on the same line, column or diagonal. 
// Write a program that finds the longest sequence of equal strings in the matrix.

using System;

class FindLongestSequenceOfEqualStrings
{
    static void Main()
    {
        //// read from console
        //Console.WriteLine("Enter Matrix of string with size N x M");
        //Console.Write("Enter rows (N): ");
        //int rows = int.Parse(Console.ReadLine());
        //Console.Write("Enter columns (M): ");
        //int columns = int.Parse(Console.ReadLine());

        //Console.WriteLine("Enter matrix elements:");
        //string[,] matrix = new string[rows, columns];
        //for (int row = 0; row < matrix.GetLength(0); row++)
        //{
        //    for (int col = 0; col < matrix.GetLength(1); col++)
        //    {
        //        Console.Write("Matrix[{0}, {1}] = ", row, col);
        //        matrix[row, col] = Console.ReadLine();
        //    }
        //}

        string[,] matrix = {
                           {"ha", "fif", "ho", "hi"},
                           {"fo", "ha", "hi", "xx"},
                           {"xxx", "ho", "ha", "xx"}
                           };
        for (int row = 0; row < matrix.GetLength(0); row++)
        {
            for (int col = 0; col < matrix.GetLength(1); col++)
            {
                string element = matrix[row, col];
                // find on line
                for (int line = 0; line < matrix.GetLength(0); line++)
                {
                    
                }
                // find on column

                // find on diagonal
            }
        }


    }
}